﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                          xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:UI="clr-namespace:Mengsk.ProxyDelivery.App.UI.PageBar" x:Class="Mengsk.ProxyDelivery.App.UI.Seller.SellerInfoUserControl"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="1200">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0">
            <TextBlock Text="卖家编号:" Margin="3" VerticalAlignment="Center"/>
            <TextBox  x:Name="tbId" Margin="3" VerticalAlignment="Center"  Width="130"/>
            <TextBlock Text="卖家账号:" Margin="3" VerticalAlignment="Center" />
            <TextBox  x:Name="tbName" Margin="3" VerticalAlignment="Center"  Width="130"/>
            <TextBlock  Text="卖家手机:" Margin="3" VerticalAlignment="Center"/>
            <TextBox x:Name="tbPhone"  Margin="3" VerticalAlignment="Center" Width="130"/>
            <TextBlock  Text="卖家邮箱:" Margin="3" VerticalAlignment="Center"/>
            <TextBox  x:Name="tbMail" Margin="3" VerticalAlignment="Center" Width="130"/>
            <TextBlock  Text="注册时间：" Margin="3" VerticalAlignment="Center"/>
            <DatePicker  x:Name="tbRegisterStart" VerticalAlignment="Center" Width="130"/>
            <TextBlock  Text="到：" Margin="3" VerticalAlignment="Center"/>
            <DatePicker  x:Name="tbRegisterEnd" VerticalAlignment="Center" Width="130"/>
            <Button  x:Name="btnSearch" Content="搜索" Margin="3" VerticalAlignment="Center" Width="60" Click="btnSearch_Click"/>
        </StackPanel>

        <DataGrid Grid.Row="1" Name="dgvSeller" IsReadOnly="True" AutoGenerateColumns="False" GridLinesVisibility="All" CanUserAddRows="False" CanUserDeleteRows="False" SelectionMode="Extended" SelectionUnit="FullRow">
            <DataGrid.Columns>
                <DataGridTextColumn Header="卖家编号" Binding="{Binding Id}" Width="Auto"/>
                <DataGridTextColumn Header="卖家邮箱" Binding="{Binding Mail}" Width="Auto"/>
                <DataGridTextColumn Header="卖家手机" Binding="{Binding Phone}" Width="Auto"/>
                <DataGridTextColumn Header="邀请注册" Binding="{Binding RegisterSource}" Width="Auto"/>
                <DataGridTextColumn Header="代发鞋子" Binding="{Binding SellerLevel.TotalScore}" Width="Auto"/>
                <DataGridTextColumn Header="动态等级" Binding="{Binding SellerLevel.DynamicLevel}" Width="Auto"/>
                <DataGridTextColumn Header="服务折扣" Binding="{Binding SellerLevel.ServiceScale}" Width="Auto"/>
                <DataGridTextColumn Header="运费折扣" Binding="{Binding SellerLevel.DeliveryScale}" Width="Auto"/>
                <DataGridTextColumn Header="邀请折扣" Binding="{Binding SellerLevel.InvitationScale}" Width="Auto"/>
                <DataGridTextColumn Header="发货人姓名" Binding="{Binding SellerSenderInfo.SenderName}" Width="Auto"/>
                <DataGridTextColumn Header="发货人电话" Binding="{Binding SellerSenderInfo.SenderPhone}" Width="Auto"/>
                <DataGridTextColumn Header="注册时间" Binding="{Binding CreateTime,StringFormat=yyyy-MM-dd HH:mm:ss}" Width="Auto"/>
                <DataGridTextColumn Header="当前状态" Binding="{Binding Enabled,Converter={StaticResource boolConverter},ConverterParameter=禁用|启用}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid>

        <UI:PageBarUserControl Grid.Row="2" PageSize="200" x:Name="pbBar" PageChanging="pbBar_PageChanging"/>

    </Grid>
</UserControl>
